<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>My App</title>
    <link rel="stylesheet" href="../../packages/core/css/framework7.min.css">
    <link rel="stylesheet" href="../../css/framework7-icons.css">
  </head>
  <body>
    <div id="app"></div>
    <template id="app-template">
      <f7-app>
        <f7-view main>
          <f7-page class="grid-demo">
            <f7-navbar title="Grid / Layout"></f7-navbar>
            <f7-block>
              <p>Columns within a row are automatically set to have equal width. Otherwise you can define your column with pourcentage of screen you want.</p>
            </f7-block>
            <f7-block-title>Columns with gap</f7-block-title>
            <f7-block>
              <f7-row>
                <f7-col>50% (.col)</f7-col>
                <f7-col>50% (.col)</f7-col>
              </f7-row>
              <f7-row>
                <f7-col>25% (.col)</f7-col>
                <f7-col>25% (.col)</f7-col>
                <f7-col>25% (.col)</f7-col>
                <f7-col>25% (.col)</f7-col>
              </f7-row>
              <f7-row>
                <f7-col>33% (.col)</f7-col>
                <f7-col>33% (.col)</f7-col>
                <f7-col>33% (.col)</f7-col>
              </f7-row>
              <f7-row>
                <f7-col>20% (.col)</f7-col>
                <f7-col>20% (.col)</f7-col>
                <f7-col>20% (.col)</f7-col>
                <f7-col>20% (.col)</f7-col>
                <f7-col>20% (.col)</f7-col>
              </f7-row>
              <f7-row>
                <f7-col width="33">33% (.col-33)</f7-col>
                <f7-col width="66">66% (.col-66)</f7-col>
              </f7-row>
              <f7-row>
                <f7-col width="25">25% (.col-25)</f7-col>
                <f7-col width="25">25% (.col-25)</f7-col>
                <f7-col width="50">50% (.col-50)</f7-col>
              </f7-row>
              <f7-row>
                <f7-col width="75">75% (.col-75)</f7-col>
                <f7-col width="25">25% (.col-25)</f7-col>
              </f7-row>
              <f7-row>
                <f7-col width="80">80% (.col-80)</f7-col>
                <f7-col width="20">20% (.col-20)</f7-col>
              </f7-row>
            </f7-block>
            <f7-block-title>No gap between columns</f7-block-title>
            <f7-block>
              <f7-row no-gap>
                <f7-col>50% (.col)</f7-col>
                <f7-col>50% (.col)</f7-col>
              </f7-row>
              <f7-row no-gap>
                <f7-col>25% (.col)</f7-col>
                <f7-col>25% (.col)</f7-col>
                <f7-col>25% (.col)</f7-col>
                <f7-col>25% (.col)</f7-col>
              </f7-row>
              <f7-row no-gap>
                <f7-col>33% (.col)</f7-col>
                <f7-col>33% (.col)</f7-col>
                <f7-col>33% (.col)</f7-col>
              </f7-row>
              <f7-row no-gap>
                <f7-col>20% (.col)</f7-col>
                <f7-col>20% (.col)</f7-col>
                <f7-col>20% (.col)</f7-col>
                <f7-col>20% (.col)</f7-col>
                <f7-col>20% (.col)</f7-col>
              </f7-row>
              <f7-row no-gap>
                <f7-col width="33">33% (.col-33)</f7-col>
                <f7-col width="66">66% (.col-66)</f7-col>
              </f7-row>
              <f7-row no-gap>
                <f7-col width="25">25% (.col-25)</f7-col>
                <f7-col width="25">25% (.col-25)</f7-col>
                <f7-col width="50">50% (.col-50)</f7-col>
              </f7-row>
              <f7-row no-gap>
                <f7-col width="75">75% (.col-75)</f7-col>
                <f7-col width="25">25% (.col-25)</f7-col>
              </f7-row>
              <f7-row no-gap>
                <f7-col width="80">80% (.col-80)</f7-col>
                <f7-col width="20">20% (.col-20)</f7-col>
              </f7-row>
            </f7-block>
      
            <f7-block-title>Nested</f7-block-title>
            <f7-block>
              <f7-row>
                <f7-col>50% (.col)
                  <f7-row>
                    <f7-col>50% (.col)</f7-col>
                    <f7-col>50% (.col)</f7-col>
                  </f7-row>
                </f7-col>
                <f7-col>50% (.col)
                  <f7-row>
                    <f7-col width="33">33% (.col-33)</f7-col>
                    <f7-col width="66">66% (.col-66)</f7-col>
                  </f7-row>
                </f7-col>
              </f7-row>
            </f7-block>
      
            <f7-block-title>Responsive Grid</f7-block-title>
            <f7-block>
              <p>Grid cells have different size on Phone/Tablet</p>
              <f7-row>
                <f7-col width="100" tablet-width="50">.col-100.tablet-50</f7-col>
                <f7-col width="100" tablet-width="50">.col-100.tablet-50</f7-col>
              </f7-row>
              <f7-row>
                <f7-col width="50" tablet-width="25">.col-50.tablet-25</f7-col>
                <f7-col width="50" tablet-width="25">.col-50.tablet-25</f7-col>
                <f7-col width="50" tablet-width="25">.col-50.tablet-25</f7-col>
                <f7-col width="50" tablet-width="25">.col-50.tablet-25</f7-col>
              </f7-row>
              <f7-row>
                <f7-col width="100" tablet-width="40">.col-100.tablet-40</f7-col>
                <f7-col width="50" tablet-width="60">.col-50.tablet-60</f7-col>
                <f7-col width="50" tablet-width="66">.col-50.tablet-66</f7-col>
                <f7-col width="100" tablet-width="33">.col-100.tablet-33</f7-col>
              </f7-row>
            </f7-block>
          </f7-page>
        </f7-view>
      </f7-app>
      
    </template>
    <style>
      .grid-demo div[class*="col"] {
        background: #fff;
        text-align: center;
        color: #000;
        border: 1px solid #ddd;
        padding: 5px;
        margin-bottom: 15px;
        font-size: 12px;
      }
    </style>
    <script>var component = {}</script>
    <script src="../../packages/vue/vue.min.js"></script>
    <script src="../../packages/vue/framework7-vue.min.js"></script>
    <script src="../../packages/core/js/framework7.min.js"></script>
    <script>
      var theme = 'ios';
      if (location.href.indexOf('theme=md') >= 0) theme = 'md';
      
      if (Framework7.use) Framework7.use(Framework7Vue, { theme: theme });
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(Framework7Vue, { theme: theme });
      
      var plugin = {
        params: {
          theme: theme,
        }
      };
      
      if (Framework7.use) Framework7.use(plugin);
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(plugin);
      
      if (typeof component === 'undefined') {
        var component = {};
      }
      if (typeof routes === 'undefined') {
        var routes = [];
      }
      component.el = '#app';
      component.template = '#app-template';
      
      new Vue(component);
    </script>
  </body>
</html>